package org.noote.libs.computervision.function;

import org.noote.libs.computervision.buffer.Buffer8I;

public class Enhance {

	static float fConvolutionKernel3x3_Detail[]=
	{
		 0, -1,  0,
		-1,  9, -1,
		 0, -1,  0
	};
	static float fConvolutionKernel3x3_Focus[]=
	{
		-1,  0, -1,
		 0,  7,  0,
		-1,  0, -1
	};
	static float fConvolutionKernel3x3_High[]=
	{
		-1,  -2, -1,
		-2,  16, -2,
		-1,  -2, -1
	};

	static public boolean doDetail3x3(Buffer8I buffer)
	{
		return buffer.applyKernel3x3(fConvolutionKernel3x3_Detail, 1.0f/5.0f, 0.0f);
	}
	static public boolean doFocus3x3(Buffer8I buffer)
	{
		return buffer.applyKernel3x3(fConvolutionKernel3x3_Focus, 1.0f/3.0f, 0.0f);
	}
	static public boolean doHigh3x3(Buffer8I buffer)
	{
		return buffer.applyKernel3x3(fConvolutionKernel3x3_High, 1.0f, 0.0f);
	}
}
